﻿using DarkSKL_Core.MongoDBModules.Models;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace Dark_Core_Server.Models.Message
{
    /// <summary>
    /// 消息文档
    /// </summary>
    public class MsgDocument : DocumentUnit
    {
        /// <summary>
        /// 消息发布者ID
        /// </summary>
        [BsonElement("PublisherId")]
        [BsonRepresentation(BsonType.ObjectId)]
        public ObjectId PublisherId { set; get; }
        /// <summary>
        /// 消息接受者等级Level
        /// </summary>
        [BsonElement("RecipientLevel")]
        [BsonRepresentation(BsonType.Int32)]
        public int RecipientLevel { set; get; }
        /// <summary>
        /// 消息标签
        /// </summary>
        [BsonElement("Tags")]
        [BsonRepresentation(BsonType.String)]
        public string Tag { set; get; }
        /// <summary>
        /// 消息标题
        /// </summary>
        [BsonElement("Title")]
        [BsonRepresentation(BsonType.String)]
        public string Title { set; get; }
        /// <summary>
        /// 消息内容
        /// </summary>
        [BsonElement("Content")]
        [BsonRepresentation(BsonType.String)]
        public string Content { set; get; }
        /// <summary>
        /// 消息附件
        /// </summary>
        [BsonElement("Attachments")]
        public string[] Attachments { set; get; }
        /// <summary>
        /// 消息版本
        /// </summary>
        [BsonElement("Version")]
        [BsonRepresentation(BsonType.Double)]
        public double Version { set; get; }

    }
}
